<template>
    <div>
        <div class="box white-block">
            <table-example :data="tableData" :tableColumn="header" :stripe="true" :stripeInverse="true"
                           :showHeader="false">
            </table-example>
            <p class="mt30">*注：修改账号信息请前往统一用户管理平台或联系机构管理员。</p>
        </div>
    </div>
</template>

<script>
    import tableExample from '../../components/table'
    import {mapGetters} from 'vuex'

    export default {
        name: '',
        data() {
            return {
                tableData: [],
                header: [
                    {
                        prop: 'label',
                        minWidth: '40%',
                        align: 'center'
                    },
                    {
                        prop: 'detail',
                        minWidth: '60%',
                        align: 'center'
                    }
                ]
            }
        },
        mounted() {
            this.tableData = [
                {
                    label: '用户名',
                    detail: this.user.loginName
                },
                {
                    label: '所属处室',
                    detail: this.user.ownDeptName || this.user.manageDeptName
                },
                {
                    label: '姓名',
                    detail: this.user.name
                },
                {
                    label: '身份证号',
                    detail: this.user.idCard
                },
                {
                    label: '联系电话',
                    detail: this.user.phone
                },
                {
                    label: '电子邮箱',
                    detail: this.user.mail
                },
                {
                    label: '登录密码',
                    detail: '******'
                }
            ]
            this.$nextTick(() => {
                this.$method.updateView()
            })
        },
        computed: {
            ...mapGetters([
                'user'
            ])
        },
        methods: {},
        components: {
            tableExample
        }
    }
</script>

<style scoped lang="less">
    .box {
        padding: 1.2rem 1.4rem;
        p {
            color: #999;
            font-size: 0.16rem;

        }
    }
</style>
